function  ret  = getID( queryFeature,ID_featureNorm,numID, szID,threshold )

[numFeature,szFeature] = size(ID_featureNorm);

score = sum((ones(numFeature,1)*queryFeature - ID_featureNorm).^2,2);

% scoreIndicator = score<threshold;
% voteScore = zeros(numID,1);
% for iNumID = 1:numID
%     voteScore(iNumID) = sum(scoreIndicator((iNumID-1)*szID+1:iNumID*szID));
% end

%scoreIndicator = score<threshold;
voteScore = zeros(numID,1);
for iNumID = 1:numID
    voteScore(iNumID) = sum(score((iNumID-1)*szID+1:iNumID*szID));
end

[maxValue, ret] = min(voteScore);
if (maxValue/12)> 0.4%threshold
    ret = -1;
end
end

